package com.pray.praymall.product.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.pray.common.utils.PageUtils;
import com.pray.praymall.product.entity.SpuInfoEntity;
import com.pray.praymall.product.vo.SpuSaveVo;

import java.util.Map;

/**
 * spu信息
 *
 * @author pray
 * @email pray_cbh@163.com
 * @date 2020-08-29 10:56:49
 */
public interface SpuInfoService extends IService<SpuInfoEntity> {

    PageUtils queryPage(Map<String, Object> params);

    void saveSpuInfo(SpuSaveVo vo);

    void saveBaseSpuInfo(SpuInfoEntity spuInfoEntity);

    PageUtils queryPageByCondition(Map<String, Object> params);

    /**
     * 商品上架
     * @param spuId spuId
     */
    void up(Long spuId);

    /**
     * 根据商品id查询spu信息
     * @param skuId 商品id
     * @return spu信息
     */
    SpuInfoEntity getSpuInfoBySkuId(Long skuId);
}

